﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PalBattleEmulator.Battle
{
    public class GameBattleManager
    {
        private GameBattle battle;

        private bool inBattle;

        public bool InBattle
        {
            get { return inBattle; }
        }

        public void StartBattle(GameBattle battle)
        {
            this.battle = battle;
            battle.State = BattleState.Begin;
            ContextModules.GraphicControl.BattleStart(battle);
            battle.State = BattleState.NewRound;
            inBattle = true;
            run();
        }

        public void DrawBattle()
        {
            ContextModules.GraphicControl.BattleRedraw();
        }


        private void run()
        {
            while (inBattle)
            {
                DrawBattle();
            }
        }
    }
}
